package com.cleaningcloud.cld.api.factory;

import com.cleaningcloud.cld.api.RemoteTaskService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class RemoteTaskFallbackFactory implements FallbackFactory<RemoteTaskService> {

    private static final Logger log = LoggerFactory.getLogger(RemoteTaskFallbackFactory.class);

    @Override
    public RemoteTaskService create(Throwable throwable) {
        log.error("云管理服务调用失败:{}", throwable.getMessage());
        return new RemoteTaskService() {

            @Override
            public void staffResignation(String source) {

            }

            @Override
            public void projectContractExpiresTask(String source) {

            }

            @Override
            public void calculateAssetsDepreciationTask(String source) {

            }

            @Override
            public void calculateProjectInvoiceTask(String source) {

            }

            @Override
            public void generateCalendarTask(String source) {

            }

            @Override
            public void initializeAttendanceTask(String source) {

            }

            @Override
            public void dailySalaryCalculationTask(String source) {

            }

            @Override
            public void recruitmentPlanTask(String source) {

            }

            @Override
            public void workPlanTask(String source) {

            }

            @Override
            public void automaticConfirmTask(String source) {

            }

            @Override
            public void performanceAppraisalTask(String source) {
                
            }

            @Override
            public void customerEvaluateTask(String source) {

            }
        };
    }
}
